package him.action.coursemanage.course;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import him.action.Action;
import him.action.ActionForward;
import him.dto.coursemanage.CoursestuDTO;
import him.service.CourseStuService;
import him.serviceimple.CourseStuServiceImple;

public class CourseStuListAction implements Action {

	@Override
	public ActionForward execute(HttpServletRequest request,
			HttpServletResponse response) {
		ActionForward actforward = new ActionForward();
		CourseStuService service = CourseStuServiceImple.getInstance();
		
		String course_code = request.getParameter("course_code");
		List<CoursestuDTO> list = service.getAllCourseStuList(course_code);
		
		request.setAttribute("list", list);
		actforward.setUrl("coursestulist");
		
		return actforward;
	}

}
